class Stack:
    def __init__(self):
        self.list=[]

    def push(self,a):
        self.list.append(a)

    def pop(self):
        return self.list.pop()

    def top(self):
        return self.list[-1]

    def clear(self):
        del(self.list[:])

    def is_empty(self):
        return len(self.list)==0

    def size(self):
        return len(self.list)

if __name__=="__main__":
    stacks=Stack()
    stacks.push(12)
    stacks.push(30)
    stacks.push(80)
    stacks.push(90)
    print(stacks.top())
    print(stacks.size())
    for i in range(0,4):
        print(stacks.is_empty())
        print(stacks.pop())
    print(stacks.is_empty())